﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
    <meta http-equiv="X-UA-Compatible" value="IE=9" />

    <!--DXMETADATA start type="Literal" condition="helpversion:value=3" value="<meta name=""Microsoft.Help.SelfBranded"" content=""true"" />" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="PageItemTitle" format="<title>%%PageItemTitle%%</title>" --><title>isReservedKey Method</title><!--DXMETADATA end-->
    <!--DXMETADATA start type="ItemTitleNoQuotes" format="<meta name=""Title"" content=""%%ItemTitleNoQuotes%%""/>" --><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="PackageLink" packagename="jquery" filetype="script" firstlinkattributes="id=""mshs_support_script"""--><script src="template/packages/jquery/script/default/jquery-1.11.3.min.js" type="text/javascript" id="mshs_support_script"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="script"--><script src="template/packages/jquery-ui/script/default/jquery-ui-1.11.4.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="jquery-ui" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/jquery-ui/css/default/jquery-ui-1.11.4.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="TemplateSettingsJson" format="<script type=""text/javascript"">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:%%TemplateSettingsJson%%});</script>" --><script type="text/javascript">var Innovasys=(Innovasys||{});$.extend(true,Innovasys,{settings:{isHideBodyDuringLoadDisabled:true,dynamictoc:{isEnabled:true},inthistopic:{isSupported:true},dynamicstyles:{isDynamicWordWrapEnabled:true}}},{settings:{"dynamictoc":{"initialNodeId":"n4199","initialNodeContainer":"c69","isResizable":true},"inthistopic":{"isEnabled":true},"currentLocale":"-","isFrameless":true,"navigationKind":"inpage","versions":{"locale":{"currentId":"-"}}}});</script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="light" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/light/css/dynamic-toc.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="plugins-javascript" filetype="css"--><link rel="stylesheet" type="text/css" href="template/packages/plugins-javascript/css/default/jquery-plugins.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-javascript" filetype="css" firstlinkattributes=" data-mshv2-stylesheet=""/template/packages/core-javascript/dx.javascript.mshv2.css"" data-mshv1-stylesheet=""/template/packages/core-javascript/dx.javascript.mshv1.css"" data-responsive-mobile=""template/packages/core-javascript/dx.javascript.mobile.css"" data-responsive-tablet=""template/packages/core-javascript/dx.javascript.tablet.css"""--><link rel="stylesheet" type="text/css" href="template/packages/core-javascript/css/dx.javascript.css"  data-mshv2-stylesheet="/template/packages/core-javascript/dx.javascript.mshv2.css" data-mshv1-stylesheet="/template/packages/core-javascript/dx.javascript.mshv1.css" data-responsive-mobile="template/packages/core-javascript/dx.javascript.mobile.css" data-responsive-tablet="template/packages/core-javascript/dx.javascript.tablet.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="plugins-javascript" filetype="script"--><script src="template/packages/plugins-javascript/script/default/jquery-plugins.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    <!--DXMETADATA start type="PackageLink" packagename="core-javascript" filetype="script"--><script src="template/packages/core-javascript/script/dx.javascript.min.js" type="text/javascript"></script><!--DXMETADATA end-->
    
    <!--DXMETADATA start type="TopicId" format="<meta name=""Microsoft.Help.Id"" content=""%%TopicId%%""/>" --><meta name="Microsoft.Help.Id" content="SpreadJS~GC.Spread.Sheets.CellTypes.Base~isReservedKey"/><!--DXMETADATA end-->
    <!--DXMETADATA start type="Synopsis" StripHtmlTags="True" MaxLength="250" format="<meta name=""Description"" content=""%%Synopsis%%"" />"--><meta name="Description" content="Whether the cell type handles the keyboard event itself." /><!--DXMETADATA end-->
    <!--DXMETADATA start type="TocParentId" format="<meta name=""Microsoft.Help.TocParent"" content=""%%TocParentId%%""/>" --><meta name="Microsoft.Help.TocParent" content="SpreadJS~GC.Spread.Sheets.CellTypes.Base_methods"/><!--DXMETADATA end-->
    <meta name="Microsoft.Help.ContentType" content="Reference" />
    <!--DXMETADATA start type="MshvKeywords" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="MshvMetaTags" condition="helpversion:value=3" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.Locale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Help3CatalogLocale" condition="helpversion:value=3" format="<meta name=""Microsoft.Help.TopicLocale"" content=""%%Help3CatalogLocale%%"" />"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Stylesheets" --><link rel="stylesheet" type="text/css" href="stylesheets/hs-simpletab.css"></link><!--DXMETADATA end-->
    <!--DXMETADATA start type="StylePropertyValues" format="<style>%%StylePropertyValues%%</style>" --><style>.i-is-new .i-page-title-text::after, ul#i-dt-root li.i-is-new>a::after { content: "New" }
</style><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scripts" --><!--DXMETADATA end-->
    <!--DXMETADATA start type="DesignTime"--><!--DXMETADATA end-->
    <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_PROPERTIES" --><!--DXMETADATA end -->
    <!--DXMETADATA start type="CustomHeadContent" --><link rel="stylesheet" type="text/css" href="template/packages/core-web/css/SP.css">
<script type="text/javascript">
var currentHeader = function() {
    return "spjs";
}
</script>
<script src="template/packages/core-web/script/topNavigation.js"></script>
<script async="" src="https://www.googletagmanager.com/gtm.js?id=GTM-WT462SJ"></script>
<script>
        (function (w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime()
                , event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0]
                , j = d.createElement(s)
                , dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', 'GTM-WT462SJ');
    </script>
<!--DXMETADATA end-->
</head>

<body>
    <div id="i-before-header-content" class="i-before-header-content">
        
    </div>

    <div id="i-header-container">
        <div id="i-header-content" class="i-header-content i-content-width-container">
            <!--DXMETADATA start type="LogoImage" --><!--DXMETADATA end-->
            <div class="i-project-title"><!--DXMETADATA start type="ProjectTitle" -->SpreadJS Documentation<!--DXMETADATA end--></div>
            <div class="i-search-container">
                <!--DXMETADATA start type="outputfileextension" format="<form action=""websearch%%outputfileextension%%"">" --><form action="websearch.html"><!--DXMETADATA end-->
                <input id="i-search" name="query"/>
                <input type="submit" id="i-search-button" value=""/>
                <!--DXMETADATA start type="Literal" value="</form>" --></form><!--DXMETADATA end-->
            </div>
            <!--DXMETADATA start type="outputfileextension" format="<a id=""i-index-button"" href=""webindex%%outputfileextension%%""></a>" --><a id="i-index-button" href="webindex.html"></a><!--DXMETADATA end-->
        </div>
    </div>
    
    <div class="i-content-width-container"><div class="i-busy-overlay"></div></div>

    <div id="i-breadcrumbs-outer-container" class="i-content-width-container"><!--DXMETADATA start type="Breadcrumbs" scrap="_BREADCRUMBS" --><div class="i-breadcrumbs-container">
<a href="SpreadJS~GC.Spread.Sheets.CellTypes_namespace.html">GC.Spread.Sheets.CellTypes Namespace</a>
 / <a href="SpreadJS~GC.Spread.Sheets.CellTypes.Base.html">Base class</a>
 / isReservedKey Method</div><!--DXMETADATA end --></div>

    <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_BUBBLES" namespace="parameter" source="Item" -->
<div id="ePopupContent" class="i-popup-content">
The KeyboardEvent.
</div>
<div id="contextPopupContent" class="i-popup-content">
The context associated with the cell type. See the Remarks for more information.
</div>
<!--DXMETADATA end -->

    <div id="i-actions-outer-container" class="i-content-width-container">
        <div id="i-actions-container">
            <div id="i-actions-content" class="i-fixed-to-top">
                <!-- Spacing --> <span class="i-toggle-all-sections i-function-link">
                <label class="i-collapse-all"><!--DXMETADATA start type="Phrase" name="COLLAPSE_ALL" -->Collapse All<!--DXMETADATA end--></label>
                <label class="i-expand-all" style="display: none;"><!--DXMETADATA start type="Phrase" name="EXPAND_ALL" -->Expand All<!--DXMETADATA end--></label>
            </span><!--DXMETADATA start type="Literal" condition="communityenabled" value="%%scrap:name=_COMMUNITY_DROPDOWN%%" --><!--DXMETADATA end -->
                <div class="i-in-this-topic-container">
                    <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
                </div>
            </div>
        </div>
    </div>

    <div id="i-toc-outer-container" class="i-content-width-container">
        <div id="i-toc-container">
            <div id="i-toc-content" class="i-fixed-to-top">
                <div class="i-toc-content-scroll-container">
                    <div id="i-dynamic-toc-container"><ul id="i-dt-root"></ul></div>
                </div>
            </div>
        </div>
    </div>

    <div id="i-body-content-container" class="i-content-width-container">
        <div id="i-body-content" class="i-body-content">
            <div class="i-page-title"><div class="i-page-title-text"><!--DXMETADATA start type="PageItemTitle" -->isReservedKey Method<!--DXMETADATA end--></div></div>
            <div class="i-in-this-topic-container">
                <span class="i-action-group-heading"><!--DXMETADATA start type="Phrase" Name="IN_THIS_TOPIC" -->In This Topic<!--DXMETADATA end--></span>
            </div>
            <!--DXMETADATA start type="Description" source="Item" format="<div class=""i-description-content"">%%description%%</div>" --><div class="i-description-content">Whether the cell type handles the keyboard event itself.</div><!--DXMETADATA end -->
            <!--DXMETADATA start type="SyntaxSection" format="%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=syntax,caption=$$Syntax$$%%%%SyntaxSection%%" --><div class="i-section-heading" id="i-syntax-section-heading"><span class="i-section-heading-icon"><!-- --></span><span class="i-section-heading-text">Syntax</span></div><div id="i-syntax-section-content" class="i-section-content">
      <div class="i-tab-container i-tab-container">
      <ul>
      
      <li class="i-filtered-content-Javascript_Usage"><a href="#i-syntax-Javascript_Usage">Javascript (Usage)</a></li>
    

      <li class="i-filtered-content-Javascript"><a href="#i-syntax-Javascript">Javascript (Specification)</a></li>
    

      </ul>
      
      <div id="i-syntax-Javascript_Usage" class="i-filtered-content-Javascript_Usage">
      <pre>var instance = new <a href="SpreadJS~GC.Spread.Sheets.CellTypes.Base.html">GC.Spread.Sheets.CellTypes.Base</a>();
var value; // Type: boolean
value = instance.isReservedKey(e, context);</pre>
      </div>
    

      <div id="i-syntax-Javascript" class="i-filtered-content-Javascript">
      <pre>function isReservedKey( 
&nbsp;&nbsp;&nbsp;<i><a class="i-popup-link" id="ePopupLink" data-popup-contentsource="#ePopupContent" data-popup-showevent="click mouseenter">e</a></i> : KeyboardEvent,
&nbsp;&nbsp;&nbsp;<i><a class="i-popup-link" id="contextPopupLink" data-popup-contentsource="#contextPopupContent" data-popup-showevent="click mouseenter">context</a></i> : object
) : boolean;</pre>
      </div>
    

      </div>
    <!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_LIST" namespace="parameter" source="Item" filter="" NoCr="True" format="<h4 class=dxh4>$$ParameterList$$</h4>%%filtereditemlist%%" --><h4 class=dxh4>Parameters</h4><dl><dt><I>e</I></dt>
<dd>The KeyboardEvent.</dd><dt><I>context</I></dt>
<dd>The context associated with the cell type. See the Remarks for more information.</dd></dl><!--DXMETADATA end -->

            <!--DXMETADATA start type="TaggedComment" source="Item" id="##RETURNS" format="<h4 class=dxh4>$$Return_Type$$</h4><div class=""i-returns-content"">%%comment%%</div></div>" blankformat="</div>" --><h4 class=dxh4>Return Value</h4><div class="i-returns-content">Returns <code originaltag="c">true</code> if the cell type handles the keyboard event itself; otherwise, <code originaltag="c">false</code>.</div></div><!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="EXCEPTION_LIST" namespace="exception" source="Item" filter="" designtime="true" format="%%replaceinquotes:value=false%%%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=exceptions,caption=""$$Exceptions$$%%designlist:tagidentifier=##EXCEPTION,itemtype=Exception%%""%%%%filtereditemlist%%</div>" --><!--DXMETADATA end -->

            <a name="exampleBookmark"></a>
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##EXAMPLEINTRO" format="%%replaceinquotes:value=false%%%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=example,caption=""$$Example$$%%designlist:tagidentifier=##EXAMPLECODE,itemtype=Example%%""%%%%comment%%" --><div class="i-section-heading" id="i-example-section-heading"><span class="i-section-heading-icon"><!-- --></span><span class="i-section-heading-text">Example</span></div><div id="i-example-section-content" class="i-section-content">This example creates custom cells.<!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="EXAMPLEGROUP_LIST" namespace="ExampleGroup" source="Item" filter="type=inline" condition="content:content=""%%GroupExamples%%"",operator=""="",value=""True""" NoHeader="True" NoFooter="True" format="%%replaceinquotes:value=false%%%%taggedcomment:source=item,id=##EXAMPLEINTRO,blankformat=""%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=example,caption=$$Example$$%%"",format= %%%%filtereditemlist%%</div>" blankformat="%%taggedcomment:source=item,id=##EXAMPLEINTRO,format=</div>%%" --><!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" condition="content:content=""%%GroupExamples%%"",operator=""<>"",value=""True""" NoHeader="True" NoFooter="True" format="%%replaceinquotes:value=false%%%%taggedcomment:source=item,id=##EXAMPLEINTRO,blankformat=""%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=example,caption=$$Example$$%%"",format= %%%%filtereditemlist%%</div>" blankformat="%%taggedcomment:source=item,id=##EXAMPLEINTRO,format=</div>%%" --> <div class="i-filtered-content-Javascript">
    
	<div class="i-tab-container">
	    <ul>
	        <li><a href="#i-tab-content-7d6cd40b-3511-4a67-a36d-ae6cbe4bda85">Javascript</a></li>
	    </ul>
	    <div id="i-tab-content-7d6cd40b-3511-4a67-a36d-ae6cbe4bda85" class="i-filtered-content-Javascript i-code"><pre><span style="color: #008000; ">//Custom Cell Type
</span>          <span style="color: #0000FF; ">function</span> FivePointedStarCellType() {
              <span style="color: #0000FF; ">this</span>.fillStyle = <span style="color: #800000; ">&quot;orange&quot;</span>;
              <span style="color: #0000FF; ">this</span>.size = 10;
          }
          FivePointedStarCellType.prototype = <span style="color: #0000FF; ">new</span> GC.Spread.Sheets.CellTypes.Base();
          FivePointedStarCellType.prototype.paint = <span style="color: #0000FF; ">function</span> (ctx, value, x, y, w, h, style, context) {
              <span style="color: #0000FF; ">if</span> (!ctx) {
                  <span style="color: #0000FF; ">return</span>;
              }

            ctx.save();

            <span style="color: #008000; ">// draw inside the cell's boundary
</span>              ctx.rect(x, y, w, h);
              ctx.clip();
              ctx.beginPath();

            <span style="color: #0000FF; ">if</span> (value) {
                  ctx.fillStyle = <span style="color: #0000FF; ">this</span>.fillStyle;
              } <span style="color: #0000FF; ">else</span> {
                  ctx.fillStyle = <span style="color: #800000; ">&quot;gray&quot;</span>;
              }

            <span style="color: #0000FF; ">var</span> size = <span style="color: #0000FF; ">this</span>.size;
              <span style="color: #0000FF; ">var</span> dx = x + w / 2;
              <span style="color: #0000FF; ">var</span> dy = y + h / 2;
              ctx.beginPath();
              <span style="color: #0000FF; ">var</span> dig = Math.PI / 5 * 4;
              <span style="color: #0000FF; ">for</span> (<span style="color: #0000FF; ">var</span> i = 0; i &lt; 5; i++) {
                  ctx.lineTo(dx + Math.sin(i * dig) * size, dy + Math.cos(i * dig) * size);
              }
              ctx.closePath();
              ctx.fill();

            ctx.restore();
          };
          FivePointedStarCellType.prototype.getHitInfo = <span style="color: #0000FF; ">function</span> (x, y, cellStyle, cellRect, context) {
              <span style="color: #0000FF; ">var</span> xm = cellRect.x + cellRect.width / 2,
                      ym = cellRect.y + cellRect.height / 2,
                      size = 10;
              <span style="color: #0000FF; ">var</span> info = { x: x, y: y, row: context.row, col: context.col, cellRect: cellRect, sheetArea: context.sheetArea };
              <span style="color: #0000FF; ">if</span> (xm - size &lt;= x &amp;&amp; x &lt;= xm + size &amp;&amp; ym - size &lt;= y &amp;&amp; y &lt;= ym + size) {
                  info.isReservedLocation = <span style="color: #0000FF; ">true</span>;
              }
              <span style="color: #0000FF; ">return</span> info;
          };
          FivePointedStarCellType.prototype.processMouseUp = <span style="color: #0000FF; ">function</span> (hitInfo) {
              <span style="color: #0000FF; ">var</span> sheet = hitInfo.sheet;
              <span style="color: #0000FF; ">if</span> (sheet &amp;&amp; hitInfo.isReservedLocation) {
                  <span style="color: #0000FF; ">var</span> row = hitInfo.row, col = hitInfo.col, sheetArea = hitInfo.sheetArea;
                  <span style="color: #0000FF; ">var</span> newValue = !sheet.getValue(row, col, sheetArea);
                  <span style="color: #0000FF; ">var</span> cellEditInfo = { row: row, col: col, newValue: newValue };
         spread.commandManager().execute({cmd: <span style="color: #800000; ">&quot;editCell&quot;</span>, sheetName: activeSheet.name(), row: row, col: col, newValue: newValue});
                  <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">true</span>;
              }
              <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">false</span>;
          };

        <span style="color: #0000FF; ">function</span> FullNameCellType() {
          }
          FullNameCellType.prototype = <span style="color: #0000FF; ">new</span> GC.Spread.Sheets.CellTypes.Base();
          FullNameCellType.prototype.paint = <span style="color: #0000FF; ">function</span> (ctx, value, x, y, w, h, style, context) {
              <span style="color: #0000FF; ">if</span> (value) {
                  GC.Spread.Sheets.CellTypes.Base.prototype.paint.apply(<span style="color: #0000FF; ">this</span>, [ctx, value.firstName + <span style="color: #800000; ">&quot;.&quot;</span> + value.lastName, x, y, w, h, style, context]);
              }
          };
          FullNameCellType.prototype.updateEditor = <span style="color: #0000FF; ">function</span> (editorContext, cellStyle, cellRect, context) {
              <span style="color: #0000FF; ">if</span> (editorContext) {
                  $(editorContext).width(cellRect.width);
                  $(editorContext).height(100);
              }
          };
          FullNameCellType.prototype.createEditorElement = <span style="color: #0000FF; ">function</span> (context) {
              <span style="color: #0000FF; ">var</span> div = document.createElement(<span style="color: #800000; ">&quot;div&quot;</span>);
              <span style="color: #0000FF; ">var</span> $div = $(div);
              $div.attr(<span style="color: #800000; ">&quot;gcUIElement&quot;</span>, <span style="color: #800000; ">&quot;gcEditingInput&quot;</span>);
              $div.css(<span style="color: #800000; ">&quot;background-color&quot;</span>, <span style="color: #800000; ">&quot;white&quot;</span>);
              $div.css(<span style="color: #800000; ">&quot;position&quot;</span>, <span style="color: #800000; ">&quot;absolute&quot;</span>);
              $div.css(<span style="color: #800000; ">&quot;overflow&quot;</span>, <span style="color: #800000; ">&quot;hidden&quot;</span>);
              $div.css(<span style="color: #800000; ">&quot;border&quot;</span>, <span style="color: #800000; ">&quot;2px #5292f7 solid&quot;</span>);
              <span style="color: #0000FF; ">var</span> $span1 = $(<span style="color: #800000; ">&quot;&lt;span&gt;&lt;/span&gt;&quot;</span>);
              $span1.css(<span style="color: #800000; ">&quot;display&quot;</span>, <span style="color: #800000; ">&quot;block&quot;</span>);
              <span style="color: #0000FF; ">var</span> $span2 = $(<span style="color: #800000; ">&quot;&lt;span&gt;&lt;/span&gt;&quot;</span>);
              $span2.css(<span style="color: #800000; ">&quot;display&quot;</span>, <span style="color: #800000; ">&quot;block&quot;</span>);
              <span style="color: #0000FF; ">var</span> $input1 = $(<span style="color: #800000; ">&quot;&lt;input type='text'/&gt;&quot;</span>);
              <span style="color: #0000FF; ">var</span> $input2 = $(<span style="color: #800000; ">&quot;&lt;input type='text'/&gt;&quot;</span>);
              $div.append($span1);
              $div.append($input1);
              $div.append($span2);
              $div.append($input2);
              <span style="color: #0000FF; ">return</span> div;
          };
          FullNameCellType.prototype.getEditorValue = <span style="color: #0000FF; ">function</span> (editorContext) {
              <span style="color: #0000FF; ">if</span> (editorContext &amp;&amp; editorContext.children.length === 4) {
                  <span style="color: #0000FF; ">var</span> input1 = editorContext.children[1];
                  <span style="color: #0000FF; ">var</span> firstName = $(input1).val();
                  <span style="color: #0000FF; ">var</span> input2 = editorContext.children[3];
                  <span style="color: #0000FF; ">var</span> lastName = $(input2).val();
                  <span style="color: #0000FF; ">return</span> { firstName: firstName, lastName: lastName };
              }
          };
          FullNameCellType.prototype.setEditorValue = <span style="color: #0000FF; ">function</span> (editorContext, value) {
              <span style="color: #0000FF; ">if</span> (editorContext &amp;&amp; editorContext.children.length === 4) {
                  <span style="color: #0000FF; ">var</span> span1 = editorContext.children[0];
                  $(span1).text(<span style="color: #800000; ">&quot;First Name:&quot;</span>);
                  <span style="color: #0000FF; ">var</span> span2 = editorContext.children[2];
                  $(span2).text(<span style="color: #800000; ">&quot;Last Name:&quot;</span>);
                  <span style="color: #0000FF; ">if</span> (value) {
                      <span style="color: #0000FF; ">var</span> input1 = editorContext.children[1];
                      $(input1).val(value.firstName);
                      <span style="color: #0000FF; ">var</span> input2 = editorContext.children[3];
                      $(input2).val(value.lastName);
                  }
              }
          };
          FullNameCellType.prototype.isReservedKey = <span style="color: #0000FF; ">function</span> (e, context) {
              <span style="color: #008000; ">//cell type handle tab key by itself
</span>              <span style="color: #0000FF; ">return</span> (e.keyCode === GC.Spread.Commands.Key.tab &amp;&amp; !e.ctrlKey &amp;&amp; !e.shiftKey &amp;&amp; !e.altKey);
          };
          FullNameCellType.prototype.isEditingValueChanged = <span style="color: #0000FF; ">function</span> (oldValue, newValue,context) {
              <span style="color: #0000FF; ">if</span> (newValue.firstName != oldValue.firstName || newValue.lastName != oldValue.lastName) {
                  <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">true</span>;
              }
              <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">false</span>;
          };
          $(<span style="color: #0000FF; ">function</span> () {

<span style="color: #0000FF; ">var</span> spread = <span style="color: #0000FF; ">new</span> GC.Spread.Sheets.Workbook(document.getElementById(<span style="color: #800000; ">&quot;ss&quot;</span>),{sheetCount:3});
              <span style="color: #0000FF; ">var</span> sheet = spread.getActiveSheet();
              sheet.suspendPaint();
              sheet.setCellType(0, 0, <span style="color: #0000FF; ">new</span> FivePointedStarCellType());
              sheet.setValue(0, 0, <span style="color: #0000FF; ">true</span>);
              sheet.setRowHeight(0, 200);
              sheet.setColumnWidth(0, 200);
              sheet.setCellType(0, 1, <span style="color: #0000FF; ">new</span> FullNameCellType());
              sheet.setColumnWidth(1, 200);
              sheet.setValue(0, 1, { firstName: <span style="color: #800000; ">&quot;Bob&quot;</span>, lastName: <span style="color: #800000; ">&quot;Smith&quot;</span> });
              sheet.resumePaint();
          });</pre></div>
	</div>
</div>
</div><!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="" NoHeader="True" NoFooter="True" format="%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=example,caption=$$Example$$%%%%filtereditemlist%%</div>" --><!--DXMETADATA end -->
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##REMARKS" format="%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=remarks,caption=$$Remarks$$%%%%comment%%</div>" --><div class="i-section-heading" id="i-remarks-section-heading"><span class="i-section-heading-icon"><!-- --></span><span class="i-section-heading-text">Remarks</span></div><div id="i-remarks-section-content" class="i-section-content"><p>You can override the isReservedKey method to customize the reserved key. In display mode, once isReservedKey returns True, the sheet will not handle the reserved key event. The event is handled by the&nbsp;<a href="SpreadJS~GC.Spread.Sheets.CellTypes.Base~processKeyUp.html">processKeyDown</a> and&nbsp;<a href="SpreadJS~GC.Spread.Sheets.CellTypes.Base~processKeyUp.html">processKeyUp</a> methods.</p>

<p>The context parameter can include the following items:</p>

<table>
    <tbody>
        <tr>
            <td><strong>Item</strong></td>

            <td><strong>Type</strong></td>

            <td><strong>Description</strong></td>
        </tr>

        <tr>
            <td>context.isEditing</td>

            <td>boolean</td>

            <td>Whether the cell is being edited.</td>
        </tr>

        <tr>
            <td>context.sheet</td>

            <td>GC.Spread.Sheets.Sheet instance</td>

            <td>Indicates the current sheet.</td>
        </tr>

        <tr>
            <td>context.row</td>

            <td>number</td>

            <td>The row index.</td>
        </tr>

        <tr>
            <td>context.col</td>

            <td>number</td>

            <td>The column index.</td>
        </tr>

        <tr>
            <td>context.sheetArea</td>

            <td>GC.Spread.Sheets.SheetArea</td>

            <td>The current sheet area.</td>
        </tr>
    </tbody>
</table></div><!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="BROWSER_COMPATIBILITY_LIST" namespace="Browser Compatibility" source="Item" filter="" condition="content:content=""%%IncludeBrowserCompatibility%%"",operator=""="",value=""True""" format="%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=browsercompatibility,caption=$$Browser_Compatibility$$%%%%filtereditemlist%%</div>" blankformat="%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=browsercompatibility,caption=$$Browser_Compatibility$$%%%%filtereditemlist%%</div>"--><!--DXMETADATA end -->
            <!--DXMETADATA start type="FilteredItemList" scrap="CATEGORIZED_LINKS" namespace="linkcategory" source="Item" filter="" NoHeader="True" NoFooter="True" format="%%replaceinquotes:value=false%%%%scrap:name=_COLLAPSIBLE_HEADER,idprefix=seealso,caption=""$$See_Also$$%%designlist:tagidentifier=##SEEALSO,itemtype=See Also%%""%%%%filtereditemlist%%</div>"--><div class="i-section-heading" id="i-seealso-section-heading"><span class="i-section-heading-icon"><!-- --></span><span class="i-section-heading-text">See Also</span></div><div id="i-seealso-section-content" class="i-section-content"><h4 class="dxh4">Reference</h4><p><a href="SpreadJS~GC.Spread.Sheets.CellTypes.Base.html">Base class</a>
</p>
</div><!--DXMETADATA end-->
            <div id="i-footer-content" class="i-footer-content">
                <!--DXMETADATA start type="Scrap" condition="communityenabled" name="_COMMUNITY_FOOTER" --><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="CopyrightNotice" format="<p>&nbsp;</p><p>&nbsp;</p><hr style=""height: 1px"" /><p>%%variable%%</p>" --><p>&nbsp;</p><p>&nbsp;</p><hr style="height: 1px" /><p><p>Copyright © 2019 GrapeCity, Inc. All rights reserved.</p>
<p><a href="https://www.grapecity.com/en/forums/winforms-edition" target="_blank">Product Support Forum</a> | <a href="javascript:window.print()">Print this page</a></p>
<ul class="social">
<li><a href="https://www.facebook.com/GrapeCityUS/" target="_blank" class="facebook">&nbsp;</a></li>
<li><a href="https://twitter.com/GrapeCityUS" target="_blank" class="twitter">&nbsp;</a></li>
<li><a href="https://www.linkedin.com/company/grapecity" target="_blank" class="linkedin">&nbsp;</a></li>
</ul>
</p><!--DXMETADATA end -->
<!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><a href="mailto:support@company.com?subject=Documentation Feedback: SpreadJS~GC.Spread.Sheets.CellTypes.Base~isReservedKey.html">Send comments</a> on this topic.<!--DXMETADATA end-->
            </div>
        </div>
    </div>
        
    <script type="text/javascript">
        $(function () {
            var documentInstance = new Innovasys.Content.Document(document.body);
            documentInstance.load();
        });
    </script>
</body>
</html>
